﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BMUpload
{   //上传业务类
    public  class UploadBLL
    {

        public bool Login(string UserID, string Pwd)
        {
            string sss = @"<?xml version=""1.0"" encoding=""utf-8""?><hnisi>
                        <head><version>1.0</version></head><body><params>
                        <param key=""USERID"" val=""{0}""/>
                        <param key=""PASSWORD"" val=""{1}"" />
                        </params></body></hnisi>";
            string endpoint = "CommFileServiceHttpSoap11Endpoint";
            sss = string.Format(sss, UserID, Pwd); 

            #region 另一种构造方式
            //BasicHttpBinding tc = new BasicHttpBinding();
            //tc.TransferMode = TransferMode.Streamed;
            //tc.MessageEncoding = WSMessageEncoding.Mtom;
            #endregion


            GDspsy.CommFileServicePortTypeClient scr = new GDspsy.CommFileServicePortTypeClient(endpoint);
            try
            {
                string srv = scr.login("XML", "XMLPROCESSOR", "FN1", sss);
                //Console.WriteLine(srv);
                //Console.Read();
                string suc1 = string.Empty;
                analysisRV arv = new analysisRV(srv);
                arv.Deal();

                //Console.WriteLine(arv.MSG);
                //Console.WriteLine(arv.SESSIONID);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }


            return true;
        }


        /// <summary>
        /// 进货信息上传
        /// </summary>
        public void ltqyJhEntryUpload()
        { 
            
        }


       
    }
}
